
<%@ include file="../confHeader.jsp" %>
<%@ include file="../mensagens.jsp" %>
<html>
<head>
	
</head>
<body>

 <html:javascript formName="OrcamentoForm" />  
 <html:form  action="orcamentoAction.do?method=gravar" method="POST" onsubmit="return validateOrcamentoForm(this);"> 	
   <html:hidden property="idOrcamento" />   
   
   <div class='pageForm'>
      <div class='formTitle'>      
	        <logic:equal value="true"  name="to" property="update" >
	       		<bean:message key="app.form.update"/>
	       </logic:equal>
	       <logic:notEqual value="true"  name="to"  property="update">
		       	<bean:message key="app.form.create"/>
	       </logic:notEqual>
	       &nbsp;<bean:message key="orcamento.entity"/>

      </div>            
 
        <div class='formField'>
            <label><bean:message key="orcamento.dtLevantamentoPreco"/></label>            
           	  <html:text   property="dtOrcamento" size="20"  />	      
        </div>
         <div class='formField'>
         	<table> <tr><td> <label class="formField"><bean:message key="orcamento.vencedor"  />:</label></td>
         	<td> <label class="formField"><bean:message key="app.msg.yes" /></label> </td>
         	<td> <html:radio  property="vencedor" value="true" /></td> 
            <td> <label class="formField"><bean:message key="app.msg.no" /></label> </td>
         	<td> <html:radio  property="vencedor" value="false" />	</td> </tr></table> 
           	    
        </div>       
         <div class='formField'>
         <label><bean:message key="orcamento.observacao"/></label> <br>
               <html:textarea   property="observacao"  rows="7" cols="60" onkeypress="javascript:limitLength(this,2000)" 
               onkeyup="javascript:limitLength(this,2000)" />
        </div>    
          <div class='formField'>
            <label><bean:message key="orcamento.frete"/>:</label>            
	<bean:message key="patterns.monetary.symbol" /> <html:text   property="frete" size="20"  maxlength="20"  />	      
        </div>  
        ${el:defineAllSearchResultsAsList('to.searcher', 'request', pageContext)}
        
         <div class='formField'>
            <label><bean:message key="fornecedor.entity"/></label>            
             	<html:select  property="idFornecedor" >
					<html:option value=""></html:option>	
				
					<logic:present name="fornecedorList">
					<html:options   collection="fornecedorList"  labelProperty="nome"  property="idFornecedor" />
					</logic:present>
				</html:select>
            
        </div>       
        
        <hr size="1">
           <div class='formButton'>  
             <a onclick="javascript:reset(OrcamentoForm);" class="linkButton">  <bean:message key="app.button.reset"/></a>
      		 &nbsp;
		     <a onclick="javascript:gravar();" class="linkButton">  <bean:message key="app.button.store"/></a>		    
          </div>
            
    </div>
    </html:form>
   
<script type="text/javascript">
 // <!--
   Mascara.adiciona(document.OrcamentoForm.dtOrcamento,'<bean:message key="mask.date"/>');
    Mascara.adiciona(document.OrcamentoForm.frete,'<bean:message key="mask.double.positivo"/>');
    
  var action= '<html:rewrite page="/orcamentoAction.do"/>';
  var nForm =  'OrcamentoForm';

 function gravar(){	 
	 executeForm(nForm, action, 'gravar');
 }

 
   
  //-->
</script>
</body>
</html>
